<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>喜秒后台管理系统</title>
        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=NO" />
        <meta name="description" content="">
        <meta name="author" content="">
        <!-- Bootstrap core CSS -->
        <link href="/bootstrap/css/bootstrap.css" rel="stylesheet"/>
        <!-- Font Awesome -->
        <link href="/font-awesome/css/font-awesome.css" rel="stylesheet"/>
        <!-- Datetime Picker -->
        <link href="/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" rel="stylesheet"/>
        <!--link href="/datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet"/-->
        <!-- Bootstrap Select -->
        <link href="/bootstrap-select/dist/css/bootstrap-select.css" rel="stylesheet"/>
        <!-- Bootstrap Tagsinput -->
        <link href="/bootstrap-tagsinput/src/bootstrap-tagsinput.css" rel="stylesheet"/>
        <!-- Endless -->
        <link href="/admin/css/layout.css" rel="stylesheet">
        <link href="/admin/css/skin.css" rel="stylesheet">
        <link href="/admin/css/style.css" rel="stylesheet">
        <link href="/admin/css/loading.css" rel="stylesheet">
    </head>

    <body class="overflow-hidden">
        <!-- Overlay Div -->
        <div id="overlay" class="transparent"></div>

        <!--a href="" id="theme-setting-icon"><i class="fa fa-cog fa-lg"></i></a-->
        <div id="theme-setting">
            <div class="title">
                <strong class="no-margin">Skin Color</strong>
            </div>
            <div class="theme-box">
                <a class="theme-color" style="background:#323447" id="default"></a>
                <a class="theme-color" style="background:#efefef" id="skin-1"></a>
                <a class="theme-color" style="background:#a93922" id="skin-2"></a>
                <a class="theme-color" style="background:#3e6b96" id="skin-3"></a>
                <a class="theme-color" style="background:#635247" id="skin-4"></a>
                <a class="theme-color" style="background:#3a3a3a" id="skin-5"></a>
                <a class="theme-color" style="background:#495B6C" id="skin-6"></a>
            </div>
        </div><!-- /theme-setting -->

        <div id="wrapper" class="preload">
            <div id="top-nav" class="skin-6 fixed">
                <div class="brand">
                    <span>喜秒</span>
                    <span class="text-toggle">后台管理系统</span>
                </div><!-- /brand -->
                <ul class="nav-notification clearfix pull-left">
                    <li>
                        <a id="menuToggle" href="javascript:void(0);" title="显示/隐藏菜单">
                            <span class="menu-icon">
                                <i class="fa fa-bars fa-lg"></i> 
                            </span>
                        </a>
                    </li>
                </ul>
                <ul class="nav-notification clearfix pull-left nav-btns">
                    <li>
                        <a class="nav-back-btn" href="javascript:void(0);" title="后退">
                            <span class="menu-icon">
                                <i class="fa fa-arrow-left fa-lg"></i> 
                            </span>
                        </a>
                    </li>
                    <li>
                        <a class="nav-refresh-btn" href="javascript:void(0);" title="刷新">
                            <span class="menu-icon">
                                <i class="fa fa-refresh fa-lg"></i> 
                            </span>
                        </a>
                    </li>
                    <li>
                        <a class="nav-forward-btn" href="javascript:void(0);" title="前进">
                            <span class="menu-icon">
                                <i class="fa fa-arrow-right fa-lg"></i> 
                            </span>
                        </a>
                    </li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-clock-o fa-lg"></i>
                        </a>
                        <ul class="dropdown-menu notification dropdown-3 history">
                            <li><a href="javascript:void(0);">没有历史记录</a></li>
                        </ul>
                    </li>
                </ul>
                <div class="page-title">
                </div><!-- /brand -->
                <ul class="nav-notification clearfix">
                    <li class="profile dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <strong class="user-nickname"></strong>
                            <span><i class="fa fa-chevron-down"></i></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li>
                                <a class="clearfix profile-edit-bnt" href="javascript:void(0);">
                                    <img class="user-img" src="/admin/img/user.jpg">
                                    <div class="detail">
                                        <strong class="user-nickname"></strong>
                                        <p class="grey user-account"></p> 
                                    </div>
                                </a>
                            </li>
                            <li class="profile-qrcode" style="display: none;">
                                <a tabindex="-1"class="profile-qrcode-bnt"  href="javascript:void(0);">
                                    <i class="fa fa-qrcode fa-lg fa-fw"></i> 二维码
                                </a>
                            </li>
                            <li>
                                <a tabindex="-1"class="profile-edit-bnt"  href="javascript:void(0);">
                                    <i class="fa fa-edit fa-lg fa-fw"></i> 资料编辑
                                </a>
                            </li>
                            <li>
                                <a tabindex="-1" class="password-reset-bnt" href="javascript:void(0);">
                                    <i class="fa fa-cog fa-lg fa-fw"></i> 修改密码
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a tabindex="-1" class="main-link logout-btn" href="javascript:void(0);">
                                    <i class="fa fa-lock fa-lg fa-fw"></i> 注销
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div><!-- /top-nav-->
            <div id="container">
                <aside class="skin-6">	
                    <div class="sidebar-inner">
                        <div class="scroll-content">
                            <div class="size-toggle">
                                <a class="btn btn-sm" id="sizeToggle">
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                </a>
                                <a class="btn btn-sm pull-right logout-btn"  href="javascript:void(0);">
                                    <i class="fa fa-power-off"></i>
                                </a>
                            </div>	
                            <div class="user-block clearfix">
                                <img class="user-img" src="/admin/img/user.jpg">
                                <div class="detail">
                                    <strong class="user-nickname"></strong>
                                    <ul class="list-inline" style="margin-left:2px;">
                                        <li class="user-role"></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="main-menu">
                                <ul>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="alert alert-info">
                        喜秒后台管理系统
                    </div>
                </aside>
                <div id="content">
                    <div id="main-container">
                    </div><!-- /main-container -->
                    <footer>
                        <span class="footer-brand">
                            <strong class="text-danger">喜秒</strong> 后台管理系统
                        </span>
                        <p class="no-margin">
                            &copy; 2017 <strong>北京晒耳科技有限公司</strong>. ALL Rights Reserved. 
                        </p>
                    </footer>
                </div>
            </div>
        </div><!-- /wrapper -->

        <!-- Jquery -->
        <script src="/jquery/jquery-3.2.1.js"></script>
        <!-- Bootstrap -->
        <script src="/bootstrap/js/bootstrap.min.js"></script>  
        <!-- Cookie -->
        <script src='/admin/js/jquery.cookie.min.js'></script>
        <!-- Modernizr -->
        <script src='/admin/js/modernizr.min.js'></script>
        <!-- Popup Overlay -->
        <script src='/admin/js/jquery.popupoverlay.js'></script>
        <!-- Slimscroll -->
        <script src='/admin/js/jquery.slimscroll.min.js'></script>
        <!-- Endless -->
        <script src="/admin/js/endless.js"></script> 
        <!-- Tagsinput -->
        <script src='/admin/js/jquery.tagsinput.min.js'></script>
        <!-- spark-md5 -->
        <script src="/spark-md5/spark-md5.min.js"></script>
        <!-- Datetime Picker -->
        <script src="/moment/min/moment.min.js"></script>
        <script src="/moment/locale/zh-cn.js"></script>
        <script src="/bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
        <!-- Bootstrap Select -->
        <script src="/bootstrap-select/dist/js/bootstrap-select.js"></script>
        <script src="/bootstrap-select/dist/js/i18n/defaults-zh_CN.js"></script>
        <!-- Bootstrap Tagsinput -->
        <script src="/bootstrap-tagsinput/src/bootstrap-tagsinput.js"></script>
        <!-- Fastclick -->
        <script src="/admin/js/fastclick.js"></script> 
        <!-- Echarts -->
        <script src="/packages/echarts/echarts.common.min.js"></script>
        <!-- Framework -->
        <script src="/admin/js/framework.js"></script>
        <!-- App -->
        <script src="/admin/js/app.js"></script>
        <script>
            App.debug = true;
            App.user.init = function(){
                var self = this;
                this.fushInfo();
                //修改资料
                this.profileWin = this.getProfileWin();
                $('.profile-edit-bnt').click(function(){
                    self.profileWin.show();
                    self.profileWin.form.change(self.user);
                });
                //修改密码
                this.resetPasswordWin = this.getResetPasswordWin();
                $('.password-reset-bnt').click(function(){
                    self.resetPasswordWin.show();
                    self.resetPasswordWin.form.reset();
                });
                //二维码
                this.qrcodeWin = this.getQrcodeWin();
                $('.profile-qrcode-bnt').click(function(){
                    self.qrcodeWin.show();
                });
                //注销
                $('.logout-btn').click(function(){
                    self.logout();
                });
            };
            App.user.fushInfo = function(){
                var self = this;
                App.util.request.getData({
                    url: 'user',
                    success: function(user){
                        self.user = user;
                        $('.user-img').attr('src', App.util.formator.fileUrl(user.icon, '/admin/img/user.jpg'));
                        $('.user-nickname').text(user.nickname);
                        $('.user-account').text(user.username);
                        $('.user-role').text(user.role ? user.role.name : '无角色');
                        if(user.type+'' === '1'){
                            $('.profile-qrcode').show();
                        }
                    }
                });
            };
            App.user.getQrcodeWin = function(){
                var win = new App.Win({
                    title: '企业二维码',
                    name: 'client_qrcode',
                    width: '350px',
                    mini: false,
                    lock: true,
                    dragAble: false
                });
                win.hide();
                //安装
                win.fix(App.mainContainer);
                //二维码
                win.setContent($(`
                    <div style="padding: 30px 50px;">
                        <img src="/client/qrcode" style="width: 250px;height: 250px"/>
                    </div>
                `));
                return win;
            };
            App.bootstrap([
                //管理员视图
                {
                    name: '货柜管理',
                    icon: '<i class="fa fa-window-restore fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/cabinet/factory',
                        'gp:admin/cabinet/type',
                        'gp:admin/cabinet/cabinet',
                        'gp:admin/cabinet/cell'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '柜子管理',
                            url: 'cabinet/cabinet/index',
                            permission: 'gp:admin/cabinet/cabinet',
                            openable: false
                        },
                        {
                            name: '型号管理',
                            url: 'cabinet/type/index',
                            permission: 'gp:admin/cabinet/type',
                            openable: false
                        },
                        {
                            name: '厂商管理',
                            url: 'cabinet/factory/index',
                            permission: 'gp:admin/cabinet/factory',
                            openable: false
                        }
                    ]
                },
                {
                    name: '店面管理',
                    icon: '<i class="fa fa-gg fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/storefront/storefront',
                        'gp:admin/storefront/schedule'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '店面管理',
                            url: 'storefront/storefront/index',
                            permission: 'gp:admin/storefront/storefront',
                            openable: false
                        },
                        {
                            name: '店面排期',
                            url: 'storefront/schedule/index',
                            permission: 'gp:admin/storefront/schedule',
                            openable: false
                        }
                    ]
                },
                {
                    name: '企业管理',
                    icon: '<i class="fa fa-handshake-o fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/enterprise/enterprise'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '企业管理',
                            url: 'enterprise/enterprise/index',
                            permission: 'gp:admin/enterprise/enterprise',
                            openable: false
                        }
                    ]
                },
                {
                    name: '供应商管理',
                    icon: '<i class="fa fa-support fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/supplier/supplier',
                        // 'gp:admin/supplier/goods',
                        // 'gp:admin/supplier/orders',
                        // 'gp:admin/supplier/aftersale',
                        // 'gp:admin/supplier/logistics'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '供应商管理',
                            url: 'supplier/supplier/index',
                            permission: 'gp:admin/supplier/supplier',
                            openable: false
                        },
                        // {
                        //     name: '商品管理',
                        //     url: 'supplier/goods/index',
                        //     permission: 'gp:admin/supplier/goods',
                        //     openable: false
                        // },
                        // {
                        //     name: '订单管理',
                        //     url: 'supplier/orders/index',
                        //     permission: 'gp:admin/supplier/orders',
                        //     openable: false
                        // },
                        // {
                        //     name: '订单售后',
                        //     url: 'supplier/aftersale/index',
                        //     permission: 'gp:admin/supplier/aftersale',
                        //     openable: false
                        // },
                        // {
                        //     name: '物流管理',
                        //     url: 'supplier/logistics/index',
                        //     permission: 'gp:admin/supplier/logistics',
                        //     openable: false
                        // }
                    ]
                },
                {
                    name: '商品管理',
                    icon: '<i class="fa fa-crosshairs fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/goods/goods',
                        'gp:admin/goods/brand',
                        'gp:admin/goods/goodstype',
                        'gp:admin/goods/jmschedule',
                        'gp:admin/goods/jmtheme',
                        'gp:admin/goods/jmpartition'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '商品管理',
                            url: 'goods/goods/index',
                            permission: 'gp:admin/goods/goods',
                            openable: false
                        },
                        {
                            name: '品牌管理',
                            url: 'goods/brand/index',
                            permission: 'gp:admin/goods/brand',
                            openable: false
                        },
                        {
                            name: '商品分类',
                            url: 'goods/goodstype/index',
                            permission: 'gp:admin/goods/goodstype',
                            openable: false
                        },
                        {
                            name: '极秒排期',
                            url: 'goods/jmschedule/index',
                            permission: 'gp:admin/goods/jmschedule',
                            openable: false
                        },
                        {
                            name: '专题排期',
                            url: 'goods/jmtheme/index',
                            permission: 'gp:admin/goods/jmtheme',
                            openable: false
                        },
                        {
                            name: '分区排期',
                            url: 'goods/jmpartition/index',
                            permission: 'gp:admin/goods/jmpartition',
                            openable: false
                        }
                    ]
                },
                {
                    name: '物流管理',
                    icon: '<i class="fa fa-truck fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/logistics/logistics',
                        'gp:admin/logistics/delivers',
                    ],
                    openable: true,
                    items: [
                        {
                            name: '物流管理',
                            url: 'logistics/logistics/index',
                            permission: 'gp:admin/logistics/logistics',
                            openable: false
                        },
                        {
                            name: '快递管理',
                            url: 'logistics/delivers/index',
                            permission: 'gp:admin/logistics/delivers',
                            openable: false
                        },
                    ]
                },
                //供应商视图------------------------------------------------------
                // {
                //     name: '商品管理',
                //     icon: '<i class="fa fa-window-restore fa-fw fa-lg"></i>',
                //     permission: [
                //         'gp:client/goods',
                //     ],
                //     openable: true,
                //     items: [
                //         {
                //             name: '商品列表',
                //             url: 'client/goods/index',
                //             permission: 'gp:client/goods',
                //             openable: false
                //         }
                //     ]
                // },
                //--------------------------------------------------------------
                {
                    name: '用户管理',
                    icon: '<i class="fa fa-user fa-fw fa-lg fa-border"></i>',
                    permission: [
                        'gp:admin/user/user'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '用户列表',
                            url: 'user/user/index',
                            permission: 'gp:admin/user/user',
                            openable: false
                        }
                    ]
                },
                {
                    name: '订单管理',
                    icon: '<i class="fa fa-dollar fa-fw fa-lg fa-border"></i>',
                    permission: [
                        'gp:admin/orders/orders',
                        'gp:admin/orders/aftersale',
                    ],
                    openable: true,
                    items: [
                        {
                            name: '订单管理',
                            url: 'orders/orders/index',
                            permission: 'gp:admin/orders/orders',
                            openable: false
                        },
                        {
                            name: '商城订单',
                            url: 'orders/shopping/index',
                            permission: 'gp:admin/orders/shopping',
                            openable: false
                        },
                        {
                            name: '订单售后',
                            url: 'orders/aftersale/index',
                            permission: 'gp:admin/orders/aftersale',
                            openable: false
                        }
                    ]
                },
                {
                    name: '财务管理',
                    icon: '<i class="fa fa-rmb fa-fw fa-lg fa-border"></i>',
                    permission: [
                        'gp:admin/finance/price',
                        'gp:admin/finance/invoice'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '定价管理',
                            url: 'finance/price/index',
                            permission: 'gp:admin/finance/price',
                            openable: false
                        },
                        // {
                        //     name: '发票管理',
                        //     url: 'finance/invoice/index',
                        //     permission: 'gp:admin/finance/invoice',
                        //     openable: false
                        // }
                    ]
                },
                {
                    name: '报修管理',
                    icon: '<i class="fa fa-wrench fa-fw fa-lg fa-border"></i>',
                    permission: [
                        'gp:admin/apply/repair'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '报修申请',
                            url: 'apply/repair/index',
                            permission: 'gp:admin/apply/repair',
                            openable: false
                        }
                    ]
                },
                {
                    name: '消息模版',
                    icon: '<i class="fa fa-volume-up fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/template/message'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '消息模版',
                            url: 'template/message/index',
                            permission: 'gp:admin/template/message',
                            openable: false
                        }
                    ]
                },
                {
                    name: '卡劵管理',
                    icon: '<i class="fa fa-credit-card fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/card/card',
                        'gp:admin/card/recharge'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '卡劵管理',
                            url: 'card/card/index',
                            permission: 'gp:admin/card/card',
                            openable: false
                        },
                        {
                            name: '充值记录',
                            url: 'card/recharge/index',
                            permission: 'gp:admin/card/recharge',
                            openable: false
                        }
                    ]
                },
                {
                    name: '数据统计',
                    icon: '<i class="fa fa-bar-chart-o fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/experience/experience',
                        'gp:admin/experience/stats',
                        'gp:admin/experience/enter'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '体验记录',
                            url: 'experience/experience/index',
                            permission: 'gp:admin/experience/experience',
                            openable: false
                        },
                        {
                            name: '订单报表',
                            url: 'experience/stats/index',
                            permission: 'gp:admin/experience/stats',
                            openable: false
                        },
                        {
                            name: '美文推荐',
                            url: 'experience/enter/index',
                            permission: 'gp:admin/experience/enter',
                            openable: false
                        }
                    ]
                },
                {
                    name: '意见反馈',
                    icon: '<i class="fa fa-question-circle-o fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/feedback/feedback'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '反馈列表',
                            url: 'feedback/feedback/index',
                            permission: 'gp:admin/feedback/feedback',
                            openable: false
                        }
                    ]
                },
                // {
                //     name: '官网管理',
                //     icon: '<i class="fa fa-envelope-o fa-fw fa-lg"></i>',
                //     permission: ['gp:website/websiteFb'],
                //     openable: true,
                //     items: [
                //         {
                //             name: '反馈信息',
                //             url: 'website/websiteFb/index',
                //             permission: 'gp:website/websiteFb',
                //             openable: false
                //         }
                //     ]
                // },
                {
                    name: '系统配置',
                    icon: '<i class="fa fa-cog fa-fw fa-lg"></i>',
                    permission: [
                        'gp:admin/access/user',
                        'gp:admin/access/role',
                        'gp:admin/access/operation',
                        'gp:admin/access/operationGroup'
                    ],
                    openable: true,
                    items: [
                        {
                            name: '用户管理',
                            url: 'access/user/index',
                            permission: 'gp:admin/access/user',
                            openable: false
                        },
                        {
                            name: '角色管理',
                            url: 'access/role/index',
                            permission: 'gp:admin/access/role',
                            openable: false
                        },
                        {
                            name: '操作管理',
                            url: 'access/operation/index',
                            permission: 'gp:admin/access/operation',
                            openable: false
                        },
                        {
                            name: '操作分组',
                            url: 'access/operationGroup/index',
                            permission: 'gp:admin/access/operationGroup',
                            openable: false 
                        }
                    ]
                }
            ]);
        </script>
    </body>
</html>